package org.jeecg.modules.online.cgreport.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.lang.invoke.SerializedLambda;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.online.cgform.utils.CgformUtil;
import org.jeecg.modules.online.cgreport.entity.OnlCgreportItem;
import org.jeecg.modules.online.cgreport.mapper.OnlCgreportItemMapper;
import org.jeecg.modules.online.cgreport.service.IOnlCgreportItemService;
import org.jeecg.modules.online.cgreport.util.CgReportSqlUtil;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service("onlCgreportItemServiceImpl")
/* renamed from: org.jeecg.modules.online.cgreport.service.a.d */
/* loaded from: hibernate-re-3.7.1-RC.jar:org/jeecg/modules/online/cgreport/service/a/d.class */
public class OnlCgreportItemServiceImpl extends ServiceImpl<OnlCgreportItemMapper, OnlCgreportItem> implements IOnlCgreportItemService {
    /* renamed from: a */
//    private static /* synthetic */ Object m83a(SerializedLambda serializedLambda) {
//        String implMethodName = serializedLambda.getImplMethodName();
//        boolean z = true;
//        switch (implMethodName.hashCode()) {
//            case 1731767923:
//                if (implMethodName.equals("getCgrheadId")) {
//                    z = true;
//                    break;
//                }
//                break;
//            case 1845597416:
//                if (implMethodName.equals("getIsSearch")) {
//                    z = false;
//                    break;
//                }
//                break;
//        }
//        switch (z) {
//            case false:
//                if (serializedLambda.getImplMethodKind() == 5 && serializedLambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && serializedLambda.getFunctionalInterfaceMethodName().equals("apply") && serializedLambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && serializedLambda.getImplClass().equals("org/jeecg/modules/online/cgreport/entity/OnlCgreportItem") && serializedLambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) {
//                    return (v0) -> {
//                        return v0.getIsSearch();
//                    };
//                }
//                break;
//            case true:
//                if (serializedLambda.getImplMethodKind() == 5 && serializedLambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && serializedLambda.getFunctionalInterfaceMethodName().equals("apply") && serializedLambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && serializedLambda.getImplClass().equals("org/jeecg/modules/online/cgreport/entity/OnlCgreportItem") && serializedLambda.getImplMethodSignature().equals("()Ljava/lang/String;")) {
//                    return (v0) -> {
//                        return v0.getCgrheadId();
//                    };
//                }
//                break;
//        }
//        throw new IllegalArgumentException("Invalid lambda deserialization");
//    }

    @Override // org.jeecg.modules.online.cgreport.service.IOnlCgreportItemService
    @Cacheable(value = {"sys:cache:online:rp"}, key = "'search-v2-'+#cgrheadId")
    public List<Map<String, String>> getAutoListQueryInfo(String cgrheadId) {
        LambdaQueryWrapper<OnlCgreportItem> lambdaQueryWrapper = new LambdaQueryWrapper();
        lambdaQueryWrapper.eq(OnlCgreportItem::getCgrheadId, cgrheadId).eq(OnlCgreportItem::getIsSearch, 1);
        List<OnlCgreportItem> list = list(lambdaQueryWrapper);
        List arrayList = new ArrayList();
        int i = 0;
        for (OnlCgreportItem onlCgreportItem : list) {
            Map hashMap = new HashMap(5);
            hashMap.put("label", onlCgreportItem.getFieldTxt());
            String dictCode = onlCgreportItem.getDictCode();
            if (oConvertUtils.isNotEmpty(dictCode)) {
                if (CgReportSqlUtil.m96b(dictCode)) {
                    hashMap.put(CgformUtil.view, "search");
                    hashMap.put("fieldId", onlCgreportItem.getId());
                } else {
                    hashMap.put(CgformUtil.view, CgformUtil.f272ar);
                }
            } else {
                hashMap.put(CgformUtil.view, onlCgreportItem.getFieldType().toLowerCase());
            }
            hashMap.put("mode", oConvertUtils.isEmpty(onlCgreportItem.getSearchMode()) ? "single" : onlCgreportItem.getSearchMode());
            hashMap.put("field", onlCgreportItem.getFieldName());
            i++;
            if (i > 2) {
                hashMap.put("hidden", "1");
            }
            arrayList.add(hashMap);
        }
        return arrayList;
    }
}
